#define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<assert.h>
char* my_strncat(char* dst, const char* src, size_t n)
{
	assert(dst && src);
	char* tmp = dst;
	while (*dst)
	{
		dst++;
	}
	int i;
	for (i = 0; src[i] && i < n; i++)
	{
		dst[i] = src[i];
	}

	dst[i] = 0;
	return tmp;
}
int main()
{
	char arr1[20] = "abcde";
	char arr2[] = "fghi";
	strncat(arr1, arr2, 3);
	printf("%s\n", arr1);
	return 0;
}